package com.lltt.study.controller;

import dev.langchain4j.model.chat.ChatModel;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PopularIntegrationController {
    @Resource
    private ChatModel chatModelQwen;

    @GetMapping(value = "/lc4j/boot/chat")
    public String chat(@RequestParam(value = "prompt",defaultValue = "你是谁")String prompt){
        return chatModelQwen.chat(prompt);
    }
}
